import {http} from '@/plugins/net.js'
export const list = async (searchData,currPage,pageSize) => {
    let url = '/log/list?1=1'
            if (searchData && searchData.user) {
                url = url + `&user=` + searchData.user
            }
            if (searchData && searchData.content) {
                url = url + `&content=` + searchData.content
            }
            // if (searchData && searchData.optionTime) {
            //     url = url + `&optionTime=` + searchData.optionTime
            // }
    if (currPage) {
        url += `&currentPage=${currPage}`
    }
    if (pageSize) {
        url += `&pageSize=${pageSize}`
    }
    const res = await http(url,'get',null)
    if (res) {
        return res
    }
}


export const getIpAddress = async (ip) => {
    let url = `/log/ipaddress?ip=${ip}`
    const res = await http(url,'get')
    return res
}